package com.example.shop.utils;

import org.apache.catalina.core.ApplicationContext;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

import com.example.shop.ShopApplication;
import com.example.shop.mapper.LogsMapper;
import com.example.shop.pojo.Logs;

/**
 * 日志记录类
 */
@Component
public class LogsRecord  {

	@Autowired
	private LogsMapper logsMapper;
    

    /**
     * 记录日志
     */
    public  boolean addLogs(Logs logs) {
        return logsMapper.addLogs(logs) > 0;
    }

    

}
